package com.example.youxuehu.controller;

import com.example.youxuehu.annotation.Log;
import com.example.youxuehu.bean.Youxuehu;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;

@RestController
public class DockerController {

    @Log
    @RequestMapping("/youxuehu")
    public List<Youxuehu> docker(HttpServletRequest request) {

        Youxuehu youxuehu = new Youxuehu();
        youxuehu.setUserName("jack");
        youxuehu.setUserNumber("520289");
        youxuehu.setId(1);
        youxuehu.setMessage(request.getLocalAddr() + ":" + request.getLocalPort());
        return Arrays.asList(youxuehu);
    }

}
